package com.service.dao.enums;

import com.google.common.collect.Lists;
import lombok.Getter;

import java.util.List;

public class MerchantEnums {

    public enum AuditStatus {
        /**
         * 审核未通过
         */
        invalid(0, "审核未通过"),
        /**
         * 审核通过
         */
        valid(1, "审核通过"),
        ;

        @Getter
        private Integer code;
        @Getter
        private String msg;

        AuditStatus(Integer code, String msg) {
            this.code = code;
            this.msg = msg;
        }
    }

    public enum Status {

        /**
         * 审核未通过
         */
        invalid(-1),
        /**
         * 审核中
         */
        created(0),
        /**
         * 营业中
         */
        in_business(1),
        /**
         * 休息中
         */
        rest(2),
        /**
         * 冻结
         */
        frost(3),
        ;

        @Getter
        private Integer code;

        Status(Integer code) {
            this.code = code;
        }
    }

    public static List<Integer> getMerchantValidStatus() {
        return Lists.newArrayList(
                Status.created.getCode(),
                Status.in_business.getCode(),
                Status.rest.getCode(),
                Status.frost.getCode()
        );
    }

    public enum OrderStatus {
        /**
         * 未核销
         */
        not_write_off(0),
        /**
         * 已核销
         */
        write_off(1);

        @Getter
        private Integer code;

        OrderStatus(Integer code) {
            this.code = code;
        }
    }


}
